package com.xjgzinfo.usdp.service.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * A DTO for the {@link com.xjgzinfo.usdp.domain.BladeVisualCategory} entity.
 */
@ApiModel(description = "分类 @author  jxw")
public class BladeVisualGlobalDTO implements Serializable {

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    /**
     * 配置名称
     */
    @Size(max = 50)
    @ApiModelProperty(value = "配置名称")
    private String globalName;

    /**
     * 配置关键字
     */
    @Size(max = 50)
    @ApiModelProperty(value = "配置关键字")
    private String globalKey;

    /**
     * 配置值
     */
    @Size(max = 64)
    @ApiModelProperty(value = "配置值")
    private String globalValue;

    /**
     * 是否已删除
     */
    @NotNull
    @Max(value = 10)
    @ApiModelProperty(value = "是否已删除", required = true)
    private Integer isDeleted = 0;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getGlobalName() {
        return globalName;
    }

    public void setGlobalName(String globalName) {
        this.globalName = globalName;
    }

    public String getGlobalKey() {
        return globalKey;
    }

    public void setGlobalKey(String globalKey) {
        this.globalKey = globalKey;
    }

    public String getGlobalValue() {
        return globalValue;
    }

    public void setGlobalValue(String globalValue) {
        this.globalValue = globalValue;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof BladeVisualGlobalDTO)) {
            return false;
        }

        return id != null && id.equals(((BladeVisualGlobalDTO) o).id);
    }

    @Override
    public int hashCode() {
        return 31;
    }

    @Override
    public String toString() {
        return "BladeVisualGlobalDTO{" +
                "id=" + id +
                ", globalName='" + globalName + '\'' +
                ", globalKey='" + globalKey + '\'' +
                ", globalValue='" + globalValue + '\'' +
                ", isDeleted=" + isDeleted +
                '}';
    }
}
